package com.example.Words.room.ui.activity;

import android.os.Bundle;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.NavigationUI;

import com.example.Words.R;
import com.example.Words.room.base.BaseActivity;
/**
 * <pre>
 *  author:huletian
 *  time    :2020/2/22
 *  desc    :表示层实现，调用模型层应用来对数据库进行操作
 *  version:1.0
 * </pre>
 */
public class MainActivity extends BaseActivity  {
    NavController navController;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        navController= Navigation.findNavController(findViewById(R.id.fragment));
        NavigationUI.setupActionBarWithNavController(this,navController);
    }

    @Override
    public boolean onSupportNavigateUp() {
        navController.navigateUp();
        return super.onSupportNavigateUp();
    }
}
